package demo1;

class MyArray<T,e,k> {
    public T[] objects = (T[])new Object[3];

    public T getPos (int pos) {
        return objects[pos];
    }
    public void setObj (int pos, T val) {
        objects[pos] = val;
    }
    public T[] getArray () {
        return (T[])objects;
    }
}
public class Test {
    public static void main(String[] args) {
        MyArray<Integer,Double,Integer> myArray = new MyArray<>();
        myArray.setObj(0,43);
        int a = myArray.getPos(0);
        System.out.println(a);
        Integer[] integer = myArray.getArray();
        System.out.println(integer);
    }
}
